#include <stdio.h>

#include "xlcomm/net/event_loop.h"
using namespace xlcomm;

void print(net::EventLoop* loop, int* num) {
  *num = *num + 1;
  loop->Quit();
}

int main() {
  net::EventLoop loop;
  int num = 2;
  loop.RunAfter(1, std::bind(print, &loop, &num));
  loop.Loop();
  printf("num=%d\n", num);
}